package com.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.model.pojo.LoginLog;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author zhexueqi
* @description 针对表【login_log】的数据库操作Mapper
* @createDate 2025-04-05 02:27:58
* @Entity generator.domain.LoginLog
*/
public interface LoginLogMapper extends BaseMapper<LoginLog> {


    // 查询用户最近几次登录记录
    @Select("select * from login_log where user_address = #{userAddress} order by login_time desc limit #{i}")
    List<LoginLog> selectRecentByUser(String userAddress, int i);
}
